const express=require('express');
const router=express();
const artcate=require('../router_handler/artcate');
const expressJoi=require('@escook/express-joi');
const {artcate_schema,delete_artcate_schema, get_artcate_schema,update_cate_schema}=require('../schema/artcate')
router.get('/cates',artcate.getArtCate);
router.post('/addcates',expressJoi(artcate_schema),artcate.addArtCate);
router.get('/deletecate/:id',expressJoi(delete_artcate_schema),artcate.deleteCateById);
router.get('/cates/:id',expressJoi(get_artcate_schema),artcate.getArtCatesById);
router.post('/updatecate',expressJoi(update_cate_schema),artcate.updateCatesById);
module.exports=router;